home *** CD-ROM | disk | FTP | other *** search
- // make executable with the command:
- // bcc ctlcheck.c
-
- #include <stdio.h>
- #include <string.h>
- #include <dir.h>
- #include <dos.h>
- #include <io.h>
-
- /* a mailbox entry */
- struct let {
- long start;
- long size;
- long bid;
- int status;
- };
-
-
- void
- main (argc, argv)
- int argc;
- char *argv[];
- {
- char buf[128];
- struct let ff;
- FILE *fp;
- int k = 1;
-
- sprintf (buf, "/NOS/SPOOL/MAIL/CONTROL/%s.ctl", argv[1]);
- fp = fopen (buf, "rb");
- printf (" # START SIZE BID STAT\n");
- while (!feof (fp)) {
- fread (&ff, sizeof(struct let), 1, fp);
- if (feof (fp))
- continue;
- printf ("%02d) %08lx %08lx %08lx %04x\n", k, ff.start, ff.size, ff.bid, ff.status);
- k++;
- }
- }
-
-